import request from '@/router/request'
import { getCCTVToken } from "@/utils/auth";
const baseUrl = "/cctvApi/v1"

// 获取token
export function login() {
  return request({
    url: baseUrl + '/login',
    method: 'post',
    data: {
      captcha: "",
      captcha_id: 0,
      password: "8c6976e5b5410415bde908bd4dee15dfb167a9c873fc4bb8a81f6f2ab448a918",
      username: "admin",
    },
    headers: {
      isToken: false,
      token: "Bearer null"
    }
  })
}

// 通道心跳
export function playStart(channel) {
  return request({
    url: baseUrl + '/live/play/start/' + channel,
    method: 'get',
    headers: {
      isToken: false,
      token: getCCTVToken()
    }
  })
}
